import { Tag, Tooltip } from "antd";
import { SafetyCertificateOutlined, LinkOutlined } from "@ant-design/icons";

const Exploits = ({ vulnerabilityID }: { vulnerabilityID: string }) => {
  return (
    <div style={{ display: "flex", gap: "-2px" }}>
      <Tooltip title="View details" placement="top">
        <Tag
          icon={<SafetyCertificateOutlined />}
          style={{
            display: "flex",
            alignItems: "center",
            borderRadius: "-2px",
            cursor: "pointer",
            fontSize: "10px",
            backgroundColor: "#FFA500",
            color: '#000', // Set text color to black
            fontWeight: "bold", // Make text bold
          }}
          
          onClick={() => window.open("https://nvd.nist.gov/vuln/detail/" + vulnerabilityID, "_blank")}
        >
          CISA KEV
          <LinkOutlined style={{ marginLeft: "0px" }} />
        </Tag>
      </Tooltip>
    </div>
  );
};

export default Exploits;